package org.jeecg.modules.sggg.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.sggg.entity.SgSigningRecord;
import org.jeecg.modules.sggg.mapper.SgSigningRecordMapper;
import org.jeecg.modules.sggg.service.ISgSigningRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Description: 签约表
 * @Author: jeecg-boot
 * @Date: 2022-10-17
 * @Version: V1.0
 */
@Service
public class SgSigningRecordServiceImpl extends ServiceImpl<SgSigningRecordMapper, SgSigningRecord> implements ISgSigningRecordService {

    @Autowired
    private SgSigningRecordMapper mapper;

    @Override
    public IPage<SgSigningRecord> pageList(IPage<SgSigningRecord> page, SgSigningRecord record, String orgCode, String roleCode, String userId) {
        return mapper.pageList(page, record.getMemberName(), record.getPhone(), record.getIdCard(), record.getResponsibleAgencies(),record.getSysOrgCode(), record.getIsXj(), orgCode, roleCode, userId);
    }

    @Override
    public List<SgSigningRecord> getSigningRecord(String memberId) {
        return mapper.getSigningRecord(memberId);
    }


    @Override
    public IPage<SgSigningRecord> renewalListTo(IPage<SgSigningRecord> page, SgSigningRecord signingRecord, String userId) {
        return mapper.renewalListTo(page, signingRecord.getMemberName(), signingRecord.getNum(),signingRecord.getResponsibleAgencies(),signingRecord.getSysOrgCode(), userId);
    }

    @Override
    public List<Map<String, Object>> yearSigning(String orgCode, String createTime, String updateTime) {
        return mapper.yearSigning(orgCode, createTime, updateTime);
    }

    @Override
    public List<Map<String, Object>> monthlySigning(String orgCode, String createTime, String updateTime) {
        return mapper.monthlySigning(orgCode, createTime, updateTime);
    }

    @Override
    public List<Map<String, Object>> threeHightSignNumber (String orgCode,List<String> responsibleAgencies) {
        return mapper.threeHightSignNumber(orgCode,responsibleAgencies);
    }

    @Override
    public List<SgSigningRecord> getSigningRecordByMid(String memberId) {
        return mapper.getSigningRecordByMid(memberId);
    }
}
